﻿<Window x:Class="InseSoft.Views.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
        xmlns:local="clr-namespace:InseSoft.ViewModels" 
        xmlns:controls="clr-namespace:InseSoft.Views.Controls"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
        mc:Ignorable="d"
        Title="INSE" Width="800" Height="450">
    <Window.Resources>
        <BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
    </Window.Resources>
    <StackPanel Height="Auto" VerticalAlignment="Stretch" 
                d:DataContext="{d:DesignInstance {x:Type local:MainViewModel}}">
        <StackPanel VerticalAlignment="Stretch">
            <Menu IsMainMenu="True" Height="23" HorizontalAlignment="Stretch" VerticalAlignment="Top" >
                <MenuItem Header="_Administración">
                    <MenuItem Header="_Empresas..." Command="{Binding Path=EmpresasCommand}"/>
                    <MenuItem Header="_Clientes..." Command="{Binding Path=ClientesCommand}"/>
                    <MenuItem Header="_Líneas..." Command="{Binding Path=LineasCommand}"/>
                    <Separator />
                    <MenuItem Header="_Tipo de cambio..." Command="{Binding Path=TipoCambioCommand}"/>
                </MenuItem>
                <MenuItem Header="_Cotizador">
                    <MenuItem Header="_Solicitar Cotización..." />
                    <MenuItem Header="_Cotizar..." Command="{Binding Path=CotizacionCommand}"/>
                    <MenuItem Header="_Ordenes de trabajo..." />
                </MenuItem>
                <MenuItem Header="_Inventario">
                    <MenuItem Header="_Materiales..." Command="{Binding Path=MaterialesCommand}"/>
                </MenuItem>
                <MenuItem Header="_Reportes" />
                <MenuItem Header="_Salir" >
                    <MenuItem Header="_Ingreso..." Command="{Binding Path=LoginCommand}"/>
                    <MenuItem Header="_Salir de la aplicación" Command="{Binding Path=ExitCommand}"/>
                </MenuItem>
            </Menu>
            <controls:LoginEdit HorizontalAlignment="Center" Margin="0,50,0,0" 
                                DataContext="{Binding LoginViewModel}"
                                Visibility="{Binding Path=IsNotLoggedIn, Converter={StaticResource BooleanToVisibilityConverter}}"/>
        </StackPanel>
    </StackPanel>
</Window>
